package com.kystar.muxplayer.protocol.code.get;

import android.util.Size;
import com.kystar.muxplayer.protocol.CodeCmd;

public class CG84_ScreenSize extends CodeCmd {
    public CG84_ScreenSize() {
        super(CODE_OK);
    }

    @Override
    public byte getCode() {
        return (byte) 0x84;
    }

    public Size[] getSize() {
        Size[] sizes = new Size[4];
        for (int i = 0,k=1; i < 4; i++,k+=4) {
            sizes[i] = new Size(mResult[k]<<8&0xFF00 | mResult[k+1]&0xFF,
                mResult[k+2]<<8&0xFF00 | mResult[k+3]&0xFF);
        }
        return sizes;
    }

    public static CG84_ScreenSize create() {
        return new CG84_ScreenSize();
    }

}
